<?php
namespace app\model;
use think\Model;

class PackageVersions extends Model{

    protected $resultSetType = 'package_versions';

	public static function insertPackageVersionsData($data) {
		$result=self::insert($data);
		return $result;
	}

	public static function getPackagesVersionsInfo($packageId,$version) {
		$result=self::where('package_id',$packageId)->where('version',$version)->find();
		return $result;
	}

	public static function getAllVersions($packageId) {
		$result=self::where('package_id',$packageId)->column('version');
		return $result;
	}
	public static function getVersionMetaData($packageId) {
		$result=self::where('package_id',$packageId)->find();
		return $result;
	}




}